<!DOCTYPE html>
<html lang="zh-Hans">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 6.0.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"malossov.top","root":"/","scheme":"Pisces","version":"7.8.0","exturl":false,"sidebar":{"position":"right","display":"always","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="C2000学习 基于TI官方板卡：LAUNCHXL-F280049C 评估板 | TI.com.cn  学习基础 拥有板卡。 芯片手册：TMS320F280049C data sheet, product information and support | TI.com  用户指南：用处不大，但是可以快速开始：SPRUII7B | 德州仪器 TI.com.cn 用户手册：虽然但是，其实MidWar">
<meta property="og:type" content="article">
<meta property="og:title" content="TI实时MCU学习-以TILaunchPad为例">
<meta property="og:url" content="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/index.html">
<meta property="og:site_name" content="MAL&#39;S_BLOG">
<meta property="og:description" content="C2000学习 基于TI官方板卡：LAUNCHXL-F280049C 评估板 | TI.com.cn  学习基础 拥有板卡。 芯片手册：TMS320F280049C data sheet, product information and support | TI.com  用户指南：用处不大，但是可以快速开始：SPRUII7B | 德州仪器 TI.com.cn 用户手册：虽然但是，其实MidWar">
<meta property="og:locale">
<meta property="og:image" content="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728060355947.png">
<meta property="og:image" content="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728060521577.png">
<meta property="og:image" content="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728060700456.png">
<meta property="og:image" content="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728060810966.png">
<meta property="og:image" content="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728060905079.png">
<meta property="og:image" content="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728071302694.png">
<meta property="og:image" content="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728061040737.png">
<meta property="og:image" content="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728054051651.png">
<meta property="og:image" content="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728054225650.png">
<meta property="og:image" content="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728054402100.png">
<meta property="og:image" content="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728054442741.png">
<meta property="og:image" content="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728054546999.png">
<meta property="og:image" content="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728054659114.png">
<meta property="og:image" content="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728054931246.png">
<meta property="og:image" content="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728055002376.png">
<meta property="og:image" content="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728064333468.png">
<meta property="article:published_time" content="2023-07-28T20:00:53.000Z">
<meta property="article:modified_time" content="2023-07-31T21:31:12.514Z">
<meta property="article:author" content="MALossov">
<meta property="article:tag" content="编程学习">
<meta property="article:tag" content="嵌入式">
<meta property="article:tag" content="TI">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728060355947.png">

<link rel="canonical" href="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-Hans'
  };
</script>

  <title>TI实时MCU学习-以TILaunchPad为例 | MAL'S_BLOG</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="Toggle navigation bar">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">MAL'S_BLOG</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">Welcome to Malossov's Personal Archieve!</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-主页">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>主页</a>

  </li>
        <li class="menu-item menu-item-标签">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-分类">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-归档">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
        <li class="menu-item menu-item-友链">

    <a href="/links/" rel="section"><i class="fa fa-link fa-fw"></i>友链</a>

  </li>

    <li> <a title="把这个链接拖到你的Chrome收藏夹工具栏中" href='javascript:(function() {
    function c() {
        var e = document.createElement("link");
        e.setAttribute("type", "text/css");
        e.setAttribute("rel", "stylesheet");
        e.setAttribute("href", f);
        e.setAttribute("class", l);
        document.body.appendChild(e)
    }

    function h() {
        var e = document.getElementsByClassName(l);
        for (var t = 0; t < e.length; t++) {
            document.body.removeChild(e[t])
        }
    }

    function p() {
        var e = document.createElement("div");
        e.setAttribute("class", a);
        document.body.appendChild(e);
        setTimeout(function() {
            document.body.removeChild(e)
        }, 100)
    }

    function d(e) {
        return {
            height : e.offsetHeight,
            width : e.offsetWidth
        }
    }

    function v(i) {
        var s = d(i);
        return s.height > e && s.height < n && s.width > t && s.width < r
    }

    function m(e) {
        var t = e;
        var n = 0;
        while (!!t) {
            n += t.offsetTop;
            t = t.offsetParent
        }
        return n
    }

    function g() {
        var e = document.documentElement;
        if (!!window.innerWidth) {
            return window.innerHeight
        } else if (e && !isNaN(e.clientHeight)) {
            return e.clientHeight
        }
        return 0
    }

    function y() {
        if (window.pageYOffset) {
            return window.pageYOffset
        }
        return Math.max(document.documentElement.scrollTop, document.body.scrollTop)
    }

    function E(e) {
        var t = m(e);
        return t >= w && t <= b + w
    }

    function S() {
        var e = document.createElement("audio");
        e.setAttribute("class", l);
        e.src = i;
        e.loop = false;
        e.addEventListener("canplay", function() {
            setTimeout(function() {
                x(k)
            }, 500);
            setTimeout(function() {
                N();
                p();
                for (var e = 0; e < O.length; e++) {
                    T(O[e])
                }
            }, 15500)
        }, true);
        e.addEventListener("ended", function() {
            N();
            h()
        }, true);
        e.innerHTML = " <p>If you are reading this, it is because your browser does not support the audio element. We recommend that you get a new browser.</p> <p>";
        document.body.appendChild(e);
        e.play()
    }

    function x(e) {
        e.className += " " + s + " " + o
    }

    function T(e) {
        e.className += " " + s + " " + u[Math.floor(Math.random() * u.length)]
    }

    function N() {
        var e = document.getElementsByClassName(s);
        var t = new RegExp("\\b" + s + "\\b");
        for (var n = 0; n < e.length; ) {
            e[n].className = e[n].className.replace(t, "")
        }
    }

    var e = 30;
    var t = 30;
    var n = 350;
    var r = 350;
    var i = "//7xuupy.com1.z0.glb.clouddn.com/tongxingSibel%20-%20Im%20Sorry.mp3";
    var s = "mw-harlem_shake_me";
    var o = "im_first";
    var u = ["im_drunk", "im_baked", "im_trippin", "im_blown"];
    var a = "mw-strobe_light";
    var f = "//s3.amazonaws.com/moovweb-marketing/playground/harlem-shake-style.css";
    var l = "mw_added_css";
    var b = g();
    var w = y();
    var C = document.getElementsByTagName("*");
    var k = null;
    for (var L = 0; L < C.length; L++) {
        var A = C[L];
        if (v(A)) {
            if (E(A)) {
                k = A;
                break
            }
        }
    }
    if (A === null) {
        console.warn("Could not find a node of the right size. Please try a different page.");
        return
    }
    c();
    S();
    var O = [];
    for (var L = 0; L < C.length; L++) {
        var A = C[L];
        if (v(A)) {
            O.push(A)
        }
    }
    })()    '>High一下</a> </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-Hans">
    <link itemprop="mainEntityOfPage" href="https://malossov.top/2023/07/29/ProgramLearn/TI/c2000-learn-1/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/uploads/avator.png">
      <meta itemprop="name" content="MALossov">
      <meta itemprop="description" content="是很菜的人的很菜的博客捏，无栈工程学徒ing。">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="MAL'S_BLOG">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          TI实时MCU学习-以TILaunchPad为例
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>

              <time title="Created: 2023-07-29 04:00:53" itemprop="dateCreated datePublished" datetime="2023-07-29T04:00:53+08:00">2023-07-29</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">Edited on</span>
                <time title="Modified: 2023-08-01 05:31:12" itemprop="dateModified" datetime="2023-08-01T05:31:12+08:00">2023-08-01</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">In</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E7%A1%AC%E4%BB%B6/" itemprop="url" rel="index"><span itemprop="name">硬件</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="C2000学习"><a href="#C2000学习" class="headerlink" title="C2000学习"></a>C2000学习</h1><blockquote>
<p>基于TI官方板卡：<a target="_blank" rel="noopener" href="https://www.ti.com.cn/tool/cn/LAUNCHXL-F280049C?keyMatch=280049C">LAUNCHXL-F280049C 评估板 | TI.com.cn</a></p>
</blockquote>
<h2 id="学习基础"><a href="#学习基础" class="headerlink" title="学习基础"></a>学习基础</h2><ol>
<li>拥有板卡。</li>
<li><p>芯片手册：<a target="_blank" rel="noopener" href="https://www.ti.com/product/TMS320F280049C">TMS320F280049C data sheet, product information and support | TI.com</a></p>
<ol>
<li><strong>用户指南</strong>：用处不大，但是可以快速开始：<a target="_blank" rel="noopener" href="https://www.ti.com.cn/document-viewer/cn/lit/html/SPRUII7B/trademarks-tm#tm">SPRUII7B | 德州仪器 TI.com.cn</a></li>
<li><strong>用户手册</strong>：虽然但是，其实MidWare里面东西更多：<a target="_blank" rel="noopener" href="https://www.ti.com.cn/document-viewer/cn/lit/html/zhca981">ZHCA981F | 德州仪器 TI.com.cn</a></li>
<li><strong>板卡手册：</strong>盒子里面丢了可以看看：<a target="_blank" rel="noopener" href="https://www.ti.com.cn/cn/lit/ug/swau114c/swau114c.pdf">https://www.ti.com.cn/cn/lit/ug/swau114c/swau114c.pdf</a></li>
</ol>
</li>
<li><p>拥有MyTI账号：所有下载都需要这个账号</p>
</li>
<li>速通TI的心：其实不比STM32难太多</li>
<li>准备开始</li>
</ol>
<h3 id="板卡导览"><a href="#板卡导览" class="headerlink" title="板卡导览"></a>板卡导览</h3><blockquote>
<p>等我学完了做吧</p>
</blockquote>
<h2 id="软件准备"><a href="#软件准备" class="headerlink" title="软件准备"></a>软件准备</h2><blockquote>
<p>TI给人的感觉就是：==零碎==</p>
</blockquote>
<ol>
<li><p><strong>CCS：</strong> <a target="_blank" rel="noopener" href="https://www.ti.com.cn/tool/cn/CCSTUDIO?keyMatch=CCS">CCSTUDIO IDE、配置、编译器或调试器 | TI.com.cn</a></p>
<ol>
<li>集成开发环境，安装之后装C2000就行。WEB版的下载速度也很快。<ol>
<li>注意不要下成<code>Theia</code>这个给M0用的了</li>
</ol>
</li>
<li>但是下载之后可以进行美化，详情参考大礼包。<ol>
<li>资源管理器天天403，别用了，也没啥用，截图留念。<img src="/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728060355947.png" alt="image-20230728060355947"></li>
</ol>
</li>
</ol>
</li>
<li><p><strong>C2000Ware：</strong> <a target="_blank" rel="noopener" href="https://www.ti.com.cn/tool/cn/C2000WARE">C2000WARE 软件开发套件 (SDK) | TI.com.cn</a></p>
<ol>
<li>类似于CUBE给你下的支持包，有例程，而且比CUBE那个辣眼睛的HAL库不带CUBEMX配置好看点。</li>
<li>文件结构如下：<em>（注意，以下目录结构来自5.0版本，升级之后酌情对照）</em></li>
</ol>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">.</span><br><span class="line">└── C2000Ware_5_00_00_00	<span class="comment"># 根目录</span></span><br><span class="line">    ├── C2000WareUpdater.exe	<span class="comment"># 更新器，没用</span></span><br><span class="line">    ├── C2000Ware_5<span class="number">.00</span><span class="number">.00</span><span class="number">.00</span>_manifest.html	<span class="comment"># 类似于许可证，可以查看支持的板卡和库的级别</span></span><br><span class="line">    ├── C2000Ware_v5<span class="number">.00</span><span class="number">.00</span><span class="number">.00</span>_Release_Notes.pdf	<span class="comment"># 发行说明，没用</span></span><br><span class="line">    ├── archive	<span class="comment"># 没用，存了个历史的库</span></span><br><span class="line">    ├── boards	<span class="comment"># 给硬件看/你板子要看原理图的时候看</span></span><br><span class="line">    ├── change_log.html	<span class="comment"># 没啥用</span></span><br><span class="line">    ├── device_support	<span class="comment"># 军火展示+一些老的用寄存器写的例程（基本不用看）</span></span><br><span class="line">    ├── docs	<span class="comment"># 目录导航`/docs/c2000Ware_quickstart_guide/html/index.html`</span></span><br><span class="line">    ├── driverlib	<span class="comment"># 你滴库函数！！</span></span><br><span class="line">    ├── examples	<span class="comment"># 重新导向你滴库函数</span></span><br><span class="line">    ├── kernel	<span class="comment"># RTOS</span></span><br><span class="line">    ├── libraries	<span class="comment"># 第三方库</span></span><br><span class="line">    ├── license.txt	<span class="comment"># 法律文件</span></span><br><span class="line">    ├── training	<span class="comment"># 类似于靶场，但是很烂</span></span><br><span class="line">    ├── uninstallers	<span class="comment"># 卸载器</span></span><br><span class="line">    └── utilities	<span class="comment"># 一些工具，目前没用</span></span><br></pre></td></tr></table></figure>
<ol>
<li>根据doc文档中说明如下：</li>
</ol>
<p>| Directory Name | Description                                                  |<br>| ——————— | —————————————————————————————— |<br>| .metadata      | 包含 C2000Ware 资源浏览器独立 GUI 文件。请勿修改。           |<br>| boards         | 包含 C2000 controlCARDS的硬件设计原理图、BOM、gerber 文件和文档， |<br>| device_support | 包含所有特定于设备的支持文件、位字段标头和设备开发用户指南。 |<br>| docs           | 包含 C2000Ware 软件包用户指南和所有软件包文档的 HTML 索引页。 |<br>| driverlib      | 包含特定于设备的驱动程序库和基于驱动程序的外围设备示例。     |<br>| examples       | 包含涉及多个设备/外设的示例，以展示不同的应用。              |<br>| libraries      | 包含特定于设备的库和核心库。                                 |<br>| uninstallers   | 包含 C2000Ware 卸载程序。                                    |<br>| utilities      | 包含开发实用程序应用程序，如闪存编程器、Windows 驱动程序和第三方软件 |</p>
<pre><code>4. 啊对，这么重要的东西CCS是不会给你下的。
</code></pre></li>
<li><p><strong>SysConfig</strong>:TI-CubeMX：<a target="_blank" rel="noopener" href="https://www.ti.com.cn/tool/cn/SYSCONFIG">SYSCONFIG IDE、配置、编译器或调试器 | TI.com.cn</a></p>
<ol>
<li>功能没那么强大，而且需要手动添加软件包。<img src="/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728060521577.png" alt="image-20230728060521577">选中<code>&lt;盘符&gt;:\ti\C2000</code>即可。</li>
</ol>
</li>
<li><strong>ControlSuite</strong>：一个老的库支持软件，但是支持全中文。<ol>
<li>里面有一些实用案例，结构还可以，可以拿来看。</li>
<li>和Ware一样，不创建启动方式，自己进去找。</li>
</ol>
</li>
</ol>
<blockquote>
<p>迁移可以参考：<a target="_blank" rel="noopener" href="https://www.ti.com.cn/cn/lit/ug/sprui45c/sprui45c.pdf">https://www.ti.com.cn/cn/lit/ug/sprui45c/sprui45c.pdf</a></p>
</blockquote>
<ol>
<li>其他电机、控制包请参考大礼包 :)。</li>
</ol>
<h2 id="第一个工程模板"><a href="#第一个工程模板" class="headerlink" title="第一个工程模板"></a>第一个工程模板</h2><blockquote>
<p>非常重要，直接面向C2000Ware编程的第一步！</p>
</blockquote>
<h3 id="创建你的英雄"><a href="#创建你的英雄" class="headerlink" title="创建你的英雄"></a>创建你的英雄</h3><p>直接放目录结构：</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br></pre></td><td class="code"><pre><span class="line">├── .ccsproject	<span class="comment"># CCS创建的工程文件</span></span><br><span class="line">├── .cproject	<span class="comment"># CCS创建的工程文件</span></span><br><span class="line">├── .project	<span class="comment"># CCS创建的工程文件</span></span><br><span class="line">├── App	<span class="comment"># 应用层，你编写的逻辑等</span></span><br><span class="line">│   ├── inc	<span class="comment"># 你自己的库</span></span><br><span class="line">│   └── src	<span class="comment"># 你的主要逻辑</span></span><br><span class="line">├── Bsp	<span class="comment"># SysConfig生成的你自己的班级支持包</span></span><br><span class="line">│   ├── board.c</span><br><span class="line">│   ├── board.cmd.genlibs</span><br><span class="line">│   ├── board.h</span><br><span class="line">│   ├── board.opt</span><br><span class="line">│   ├── c2000ware_libraries.c</span><br><span class="line">│   ├── c2000ware_libraries.cmd.genlibs</span><br><span class="line">│   ├── c2000ware_libraries.h</span><br><span class="line">│   ├── c2000ware_libraries.opt</span><br><span class="line">│   ├── clocktree.h</span><br><span class="line">│   ├── pinmux.csv</span><br><span class="line">│   └── untitled.syscfg	<span class="comment"># 双击可以进入配置界面</span></span><br><span class="line">├── C2000Ware	<span class="comment"># \driverlib\f28004x\driverlib 全部内容</span></span><br><span class="line">│   ├── ccs	<span class="comment"># 需要引用头文件，其中，DEBUG和RELEASE需要分开引入/排除</span></span><br><span class="line">│   ├── inc	<span class="comment"># 寄存器层的东西</span></span><br><span class="line">│   ├── ……	<span class="comment"># 其他DriverLib</span></span><br><span class="line">├── Cmd	<span class="comment"># 烧写算法文件，原始地址为：\device_support\f28004x\common\cmd 按需选用</span></span><br><span class="line">│   ├── 28004x_cla_flash_lnk.cmd</span><br><span class="line">│   ├── 28004x_cla_ram_lnk.cmd</span><br><span class="line">│   ├── 28004x_generic_flash_lnk.cmd</span><br><span class="line">│   ├── 28004x_generic_ram_lnk.cmd</span><br><span class="line">│   ├── 28004x_iqmath_flash_lnk.cmd</span><br><span class="line">│   ├── 28004x_iqmath_ram_lnk.cmd</span><br><span class="line">│   ├── 28004x_launchpad_demo_flash_lnk.cmd</span><br><span class="line">│   ├── 28004x_launchpad_demo_ram_lnk.cmd</span><br><span class="line">│   └── f28004x_headers_nonbios.cmd 	<span class="comment"># \device_support\f28004x\headers\cmd</span></span><br><span class="line">├── Debug	<span class="comment"># CCS自动生成的调试文件</span></span><br><span class="line">├── Device	<span class="comment"># 设备描述文件，只要选用这几个即可，原始目录：\device_support\f28004x\common\include和source当中</span></span><br><span class="line">│   ├── device.c</span><br><span class="line">│   ├── device.h</span><br><span class="line">│   ├── driverlib.h</span><br><span class="line">│   └── f28004x_codestartbranch.asm	<span class="comment"># 板卡启动文件</span></span><br><span class="line">├── Lib	<span class="comment"># 按需使用的C2000的库</span></span><br><span class="line">└── targetConfigs	<span class="comment"># CCS生成的</span></span><br><span class="line">    ├── TMS320F280049C.ccxml	<span class="comment"># 你的烧录器配置文件</span></span><br><span class="line">    └── readme.txt</span><br></pre></td></tr></table></figure>
<p>主要构建步骤如下：</p>
<ol>
<li><p>创建各个文件夹，并拖入文件：<strong>Cmd,Device,C2000Ware</strong></p>
</li>
<li><p>使用<code>SysConfig</code>生成<strong>BSP</strong>，直接保存全部文件（右下角）<img src="/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728060700456.png" alt="image-20230728060700456"></p>
</li>
<li><p>进入CCS之后创建工程，需要设置的地方如下：右键项目属性进入：</p>
<ol>
<li>使用的RuntimeSupport和OutputFormat，以及使用的连接器/连接件也可以直接放在工程当中（Cmd,然后禁用其他的）：<img src="/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728060810966.png" alt="image-20230728060810966"></li>
<li>预定义设置<code>DEBUG</code>宏：<img src="/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728060905079.png" alt="image-20230728060905079"></li>
<li>Include（注意在引用<code>Ware</code>当中的2000之后，还需要引入Debug并且屏蔽Release(3个lib都需要屏蔽！)：<img src="/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728071302694.png" alt="image-20230728071302694"></li>
<li>右键禁用其他的连接文件，以免造成困扰：<img src="/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728061040737.png" alt="image-20230728061040737"><ol>
<li>推荐使用generic系列的。</li>
</ol>
</li>
<li>Main中建立主函数，构建如下，初始化顺序参考官方例程，如：</li>
</ol>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;device.h&quot;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;driverlib.h&quot;</span></span></span><br><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&quot;board.h&quot;</span></span></span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * main.c</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line"><span class="type">int</span> <span class="title function_">main</span><span class="params">(<span class="type">void</span>)</span></span><br><span class="line">&#123;</span><br><span class="line">    Device_init();  <span class="comment">// 初始化设备</span></span><br><span class="line">    Interrupt_initModule(); <span class="comment">//初始化中断</span></span><br><span class="line">    Interrupt_initVectorTable();    <span class="comment">//初始化中断向量表</span></span><br><span class="line">    </span><br><span class="line">    </span><br><span class="line">    Board_init();   <span class="comment">//SysConfig文件引入</span></span><br><span class="line">    </span><br><span class="line">    Interrupt_enableMaster();   <span class="comment">//开启中断</span></span><br><span class="line">    </span><br><span class="line">    <span class="keyword">while</span>(<span class="number">1</span>);</span><br><span class="line">    </span><br><span class="line"></span><br><span class="line">	<span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
</ol>
<h2 id="外设"><a href="#外设" class="headerlink" title="外设"></a>外设</h2><h2 id="大礼包"><a href="#大礼包" class="headerlink" title="大礼包"></a>大礼包</h2><h3 id="一些“增值目录”"><a href="#一些“增值目录”" class="headerlink" title="一些“增值目录”"></a>一些“增值目录”</h3><ol>
<li>TI官方软件板卡说明：<a target="_blank" rel="noopener" href="https://software-dl.ti.com/C2000/docs/software_guide_zh/index.html">C2000™ 软件指南 — C2000™ 软件指南 (ti.com)</a></li>
<li>TI官方C2000主页：<a target="_blank" rel="noopener" href="https://www.ti.com.cn/zh-cn/microcontrollers-mcus-processors/c2000-real-time-control-mcus/overview.html">C2000 实时微控制器 | TI.com.cn</a></li>
</ol>
<h3 id="C2000的美化"><a href="#C2000的美化" class="headerlink" title="C2000的美化"></a>C2000的美化</h3><h4 id="CCS的汉化"><a href="#CCS的汉化" class="headerlink" title="CCS的汉化"></a>CCS的汉化</h4><ol>
<li>众所周知，CCS是基于Eclipse的二次开发，那么，采用Eclipse的汉化方式当然可行。</li>
<li><code>帮助-&gt;安装新软件</code>：<img src="/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728054051651.png" alt="image-20230728054051651"></li>
<li>名称随意添加，位置请添加：<a target="_blank" rel="noopener" href="https://mirrors.tuna.tsinghua.edu.cn/eclipse/technology/babel/update-site/latest/">https://mirrors.tuna.tsinghua.edu.cn/eclipse/technology/babel/update-site/latest/</a><ol>
<li>这是清华大学的babel镜像源，根据地理位置选择，搜一个。</li>
</ol>
</li>
<li>然后在babel列表Fetch出来之后选择：<img src="/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728054225650.png" alt="image-20230728054225650"></li>
<li>下一步下一步。</li>
</ol>
<h4 id="主题选择和美化"><a href="#主题选择和美化" class="headerlink" title="主题选择和美化"></a>主题选择和美化</h4><blockquote>
<p>我这里安装我喜欢的暗色主题</p>
</blockquote>
<ol>
<li><code>帮助--&gt;Eclipse市场</code>，等待载入之后选择Poular，很快找到：<img src="/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728054402100.png" alt="image-20230728054402100"></li>
<li>Icon挺好看的，但是第三个安装不了（CCS缺JAVA包），点完了就点下一个吧。<img src="/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728054442741.png" alt="image-20230728054442741"></li>
<li>安装完后如果不满意的后续更改：<ol>
<li><code>窗口--&gt;首选项--&gt;常规--&gt;外观</code>:使用主题：<img src="/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728054546999.png" alt="image-20230728054546999"></li>
<li>随后点击<code>Open Color Themes Page</code>进入主题的修改页，可以快速搭配，Enjoy！<img src="/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728054659114.png" alt="image-20230728054659114">我的：Af7-Qw</li>
<li>如果有其他好看的主题请分享给我捏。</li>
</ol>
</li>
</ol>
<h3 id="CCS使用小技巧"><a href="#CCS使用小技巧" class="headerlink" title="CCS使用小技巧"></a>CCS使用小技巧</h3><ol>
<li><p>CCS是默认开启代码补全的，只是需要快捷键触发，默认快捷键为：<code>Alt+/</code>。</p>
<ol>
<li>需要修改可以在<code>首选项--&gt;键</code>当中搜索<code>内容辅助</code>进行修改：<img src="/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728054931246.png" alt="image-20230728054931246"></li>
</ol>
</li>
<li><p>CCS恢复默认窗口：<code>窗口--&gt;透视图--&gt;复位透视图</code>根据需求恢复吧。<img src="/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728055002376.png" alt="image-20230728055002376"></p>
</li>
<li><p>Eclipse没有Copilot，但是应用商店里面有这个叫做<strong>Tabnine</strong>的插件，可以提供代码自动补齐，虽然反应不是很快；<img src="/2023/07/29/ProgramLearn/TI/c2000-learn-1/image-20230728064333468.png" alt="image-20230728064333468"></p>
<ol>
<li>在和我一起建立软件包之后，可以直接在code进行代码查找和开发哦w</li>
<li><del>白嫖Copilot的劳动力</del></li>
</ol>
</li>
</ol>

    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/%E7%BC%96%E7%A8%8B%E5%AD%A6%E4%B9%A0/" rel="tag"># 编程学习</a>
              <a href="/tags/%E5%B5%8C%E5%85%A5%E5%BC%8F/" rel="tag"># 嵌入式</a>
              <a href="/tags/TI/" rel="tag"># TI</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2022/12/28/ProgramLearn/UbuntuUsage/Linux%E5%9F%BA%E7%A1%80%E5%AE%9E%E8%B7%B5/" rel="prev" title="如何在宿舍有幽灵电脑">
      <i class="fa fa-chevron-left"></i> 如何在宿舍有幽灵电脑
    </a></div>
      <div class="post-nav-item"></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          Table of Contents
        </li>
        <li class="sidebar-nav-overview">
          Overview
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#C2000%E5%AD%A6%E4%B9%A0"><span class="nav-number">1.</span> <span class="nav-text">C2000学习</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AD%A6%E4%B9%A0%E5%9F%BA%E7%A1%80"><span class="nav-number">1.1.</span> <span class="nav-text">学习基础</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E6%9D%BF%E5%8D%A1%E5%AF%BC%E8%A7%88"><span class="nav-number">1.1.1.</span> <span class="nav-text">板卡导览</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E8%BD%AF%E4%BB%B6%E5%87%86%E5%A4%87"><span class="nav-number">1.2.</span> <span class="nav-text">软件准备</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%AC%AC%E4%B8%80%E4%B8%AA%E5%B7%A5%E7%A8%8B%E6%A8%A1%E6%9D%BF"><span class="nav-number">1.3.</span> <span class="nav-text">第一个工程模板</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E5%88%9B%E5%BB%BA%E4%BD%A0%E7%9A%84%E8%8B%B1%E9%9B%84"><span class="nav-number">1.3.1.</span> <span class="nav-text">创建你的英雄</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%A4%96%E8%AE%BE"><span class="nav-number">1.4.</span> <span class="nav-text">外设</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%A4%A7%E7%A4%BC%E5%8C%85"><span class="nav-number">1.5.</span> <span class="nav-text">大礼包</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%B8%80%E4%BA%9B%E2%80%9C%E5%A2%9E%E5%80%BC%E7%9B%AE%E5%BD%95%E2%80%9D"><span class="nav-number">1.5.1.</span> <span class="nav-text">一些“增值目录”</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#C2000%E7%9A%84%E7%BE%8E%E5%8C%96"><span class="nav-number">1.5.2.</span> <span class="nav-text">C2000的美化</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#CCS%E7%9A%84%E6%B1%89%E5%8C%96"><span class="nav-number">1.5.2.1.</span> <span class="nav-text">CCS的汉化</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E4%B8%BB%E9%A2%98%E9%80%89%E6%8B%A9%E5%92%8C%E7%BE%8E%E5%8C%96"><span class="nav-number">1.5.2.2.</span> <span class="nav-text">主题选择和美化</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#CCS%E4%BD%BF%E7%94%A8%E5%B0%8F%E6%8A%80%E5%B7%A7"><span class="nav-number">1.5.3.</span> <span class="nav-text">CCS使用小技巧</span></a></li></ol></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="MALossov"
      src="/uploads/avator.png">
  <p class="site-author-name" itemprop="name">MALossov</p>
  <div class="site-description" itemprop="description">是很菜的人的很菜的博客捏，无栈工程学徒ing。</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives">
          <span class="site-state-item-count">35</span>
          <span class="site-state-item-name">posts</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">categories</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
        <span class="site-state-item-count">29</span>
        <span class="site-state-item-name">tags</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/malossov" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;malossov" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://www.zhihu.com/people/yi-wan-nzlao-si-ji" title="知乎 → https:&#x2F;&#x2F;www.zhihu.com&#x2F;people&#x2F;yi-wan-nzlao-si-ji" rel="noopener" target="_blank"><i class="fab fa-zhihu fa-fw"></i>知乎</a>
      </span>
      <span class="links-of-author-item">
        <a href="https://gitee.com/malossov" title="Gitee → https:&#x2F;&#x2F;gitee.com&#x2F;malossov" rel="noopener" target="_blank"><i class="fab fa-gitee fa-fw"></i>Gitee</a>
      </span>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        
  <div class="beian"><a href="https://beian.miit.gov.cn/" rel="noopener" target="_blank">蜀ICP备2023019138号 </a>
  </div>

<div class="copyright">
  
  &copy; 2022 – 
  <span itemprop="copyrightYear">2023</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">MALossov</span>
</div>
  <div class="powered-by">Powered by <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://pisces.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Pisces</a>
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>


  <script defer src="/lib/three/three.min.js"></script>
    <script defer src="/lib/three/three-waves.min.js"></script>


  













<script>
if (document.querySelectorAll('pre.mermaid').length) {
  NexT.utils.getScript('//cdn.jsdelivr.net/npm/mermaid@8/dist/mermaid.min.js', () => {
    mermaid.initialize({
      theme    : 'forest',
      logLevel : 3,
      flowchart: { curve     : 'linear' },
      gantt    : { axisFormat: '%m/%d/%Y' },
      sequence : { actorMargin: 50 }
    });
  }, window.mermaid);
}
</script>


  

  

  


<!-- 页面点击小红心 -->
<script type="text/javascript" src="/js/src/love.js"></script>
<!-- 背景动画 -->
<script type="text/javascript" src="/js/src/particle.js"></script>


</body>
</html>
